package demo.pattern.proxy.dynamic.cglib;

import net.sf.cglib.proxy.Enhancer;
import net.sf.cglib.proxy.MethodInterceptor;

public class CglibUtils {

	public static <T> T newProxy(T targetObject, MethodInterceptor methodInterceptor){
		return (T)Enhancer.create(targetObject.getClass(),methodInterceptor);
	}
}
